mockseries.utils.dates
#
datetime_rangeGenerates a range of datetimes with a given granularity.
You can either use end_time
or num_points
to set the end of the range.
Arguments:
granularity
- Frequency of the data points. Eg: 1 day, 2 hours.start_time
- Start of the range.end_time
- End of the range.num_points
- Number of data points to generate.
Returns:
A list of datetimes.
#
delta_from_startReturns the timedeltas to the first element of the array.